/*
 * Created on 2006-3-14
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package com.hitrust.gs.vo;

import java.sql.ResultSet;
import java.sql.SQLException;

import com.hitrust.gs.service.GSBaseBean;
import com.hitrust.gs.service.GSBaseManager;
import com.hitrust.gs.util.lang.StringUtils;

/**
 * @author simonyi
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class GSPayReceiveAlertListVO implements GSBaseBean {

    public String deptname ;
    public String workcorpcategory ;
    public String feetypeid;
    public String paytype ;
    public String balanceneed ;
    public String balancedone ;
    public String balanceundone ;
    public String paydate ;
    public String principal ;
    public String paystatus ;
    public String feetypecontent;

    
    public Object process(ResultSet aResultSet) throws SQLException {
        GSPayReceiveAlertListVO vo = new GSPayReceiveAlertListVO();
        
        vo.deptname = aResultSet.getString("P1");
        vo.workcorpcategory = "1".equals(aResultSet.getString("P2"))?"订货单位":"供应商";
        vo.feetypeid = aResultSet.getString("P3");
        vo.paytype = "1".equals(aResultSet.getString("P4"))?"收款":"付款";
        vo.balanceneed = StringUtils.formatEDouble(aResultSet.getDouble("P5"),4);
        vo.balancedone = StringUtils.formatEDouble(aResultSet.getDouble("P6"),4);
        vo.balanceundone = StringUtils.formatEDouble(aResultSet.getDouble("P7"),4);
        vo.paydate = aResultSet.getString("P8");
        vo.principal = aResultSet.getString("P9");
        if("990".equals(vo.feetypeid) || "991".equals(vo.feetypeid)){
            vo.paystatus = "";
        }else{
            vo.paystatus = "1".equals(aResultSet.getString("P10"))?"未完成":("2".equals(aResultSet.getString("P10"))?"部分完成":"全部完成");    
        }
        
        vo.feetypecontent = aResultSet.getString("P11")==null?GSBaseManager.getPreFeeTypeName(vo.feetypeid):aResultSet.getString("P11");
        
        return vo;
    }

}
